package com.etc.service.impl;

import com.etc.Dao.StudentDao;


import com.etc.entity.Student;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.List;

public class Studentservice implements  StudentDao {
        private SqlSessionFactory sqlSessionFactory;

        public Studentservice(SqlSessionFactory sqlSessionFactory) {
            this.sqlSessionFactory = sqlSessionFactory;
        }


    @Override
    public List<Student> getUserOrderList() {
        SqlSession sqlSession = null;

        sqlSession = sqlSessionFactory.openSession();
        List<Student> getUserOrderList = sqlSession.selectList("getUserOrderList");
        return  getUserOrderList;
    }
}
